const fs = require('fs')
const path = require('path')

function getFilesStartingWith(pathName, startingString) {
  const files = fs.readdirSync(pathName)
  return files.filter(file => {
    return fs.statSync(path.join(pathName, file)).isFile() && file.startsWith(startingString)
  })
}

module.exports = getFilesStartingWith
